home *** CD-ROM | disk | FTP | other *** search
- #include <cdrfrb.h>
- #include "cd_sub.h"
-
- int cd_play( int no , struct TIMEADRS *time1, struct TIMEADRS *time2)
- {
- int ret;
- struct TIMEADRS starttime;
- struct TIMEADRS endtime;
-
- starttime.min = (time2+(no-1))->min;
- starttime.sec = (time2+(no-1))->sec;
- starttime.frame = (time2+(no-1))->frame;
-
- e_time(time1->min, time1->sec, time1->frame,
- &endtime.min, &endtime.sec, &endtime.frame);
-
- cdr_pause(0);
- ret = cdr_mtplay( 0, &starttime, &endtime);
- return(ret);
- }
- int cd_stop()
- {
- int ret;
- ret = cdr_mstop(0);
- return(ret);
- }
- int cd_info(int *type, int *strack, int *etrack ,
- struct TIMEADRS *trktime, struct TIMEADRS *disktime)
- {
- int ret;
- ret = cdr_cdinfo(0, type, strack, etrack, trktime, disktime);
- return (ret);
- }
- int cd_stat(int *stat, int *no, struct TIMEADRS *trktime,
- struct TIMEADRS *dsktime)
- {
- int ret;
- ret = cdr_mphase(0, stat, no, trktime, dsktime);
- return (ret);
- }
- void e_time(char a, char b, char c, char *d, char *e, char *f)
- {
- if(c == 0) {
- if(b ==0) a--;
- else b--;
- } else c--;
- *d = a;
- *e = b;
- *f = c;
- }